/*
 * 
 * This is a pseudo random number generator library.
 *
 * Author: Manuel Aráoz
 */

 

/* System includes */
#include <stdlib.h>
#include <time.h>


/* General includes */


/* Define Section */

/* Type definitions */

/* Prototype declarations */


/* Public Functions */

void
randomize(void)
{
	srand(time(NULL));
}

double
randNormalize(void)
{
	return rand() / ((double) RAND_MAX +1) ;
}

int
randInt(int a, int b)
{
	return a + (b - a +1)* (rand()/(double)RAND_MAX);
}

double
randReal(double a, double b)
{
	return randNormalize()* (b-a) + a;
}


/* Functions */
